home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: news.nask.org.pl!cyfronet!student!iskra
- From: iskra@student.uci.agh.edu.pl (Kamil Iskra)
- Subject: Re: Update to Native Developer Kit 3.1: Request for ideas
- Message-ID: <Dn668q.5Kr@cyf-kr.edu.pl>
- Sender: news@cyf-kr.edu.pl (News Administrator)
- Nntp-Posting-Host: student.uci.agh.edu.pl
- Organization: Academic Computer Centre, CYFRONET
- X-Newsreader: TIN [version 1.1 PL8]
- References: <1005.6624T1300T707@teclink.net>
- Date: Thu, 22 Feb 1996 08:58:02 GMT
-
- rad (rad@teclink.net) wrote:
- > The thing I would like most to see in an update is the correcting of
- > prototypes in headers to indicate when constant pointers can be passed.
-
- > (e.g. in clib/dos.h:
-
- > BPTR Open (CONST STRPTR name, long accesMode);
- > LONG Write (BPTR file, CONST APTR buffer, long length);
- > LONG DeleteFile (CONST STRPTR name);
- > LONG Rename (CONST STRPTR oldName, CONST STRPTR newName);
- > BPTR Lock (CONST STRPTR name, long type);
-
- Good point! It would make programming easier and would let compilers make
- more optimizations in some cases.
-
- Another thing in this subject that needs updating is converting all UBYTE*
- (and maybe char*, too) to STRPTR - they cause huge amount of warnings when
- compiling in C++, which uses stricter pointer checking and will not ignore
- "char*" <-> "unsigned char*" mismatches.
-
- Another thing is including all necessary headers before declaring
- prototypes in "clib" files. As "necessary" I mean headers that contain
- structures which are used in prototypes. ANSI C says that scope of
- structures implicitly declared in prototypes ends with the end of...
- prototype! This effectively makes this prototypes useless. Many compilers,
- including SAS/C, work well with such code, but GNU CC does not and is
- *right* - this is violation of ANSI standard.
-
- --
- / Kamil Iskra - AMIGA 1200, 68030 50MHz, HDD 850 MB, 10 MB RAM \
- | iskra@student.uci.agh.edu.pl kiskra@ernie.icslab.agh.edu.pl |
- | http://student.uci.agh.edu.pl/~iskra |
- \ PGP public key available via Finger or WWW /
-